package com.ruoyi.api.controller;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.domain.bo.DashboardBo;
import com.ruoyi.common.domain.vo.*;
import com.ruoyi.common.service.DashboardService;
import com.ruoyi.standingbook.extermination.domain.bo.ExterminationBo;
import com.ruoyi.standingbook.recycle.domain.bo.RecycleBo;
import com.ruoyi.standingbook.sorting.domain.bo.SortingBo;
import com.ruoyi.standingbook.toilet.domain.bo.ToiletBo;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *  大屏仪表盘查询接口 controller
 *
 * @author cc
 *
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/stat/dashboard")
public class DashboardController {
    private final DashboardService dashboardService;

    /**
     * 获取仪表盘数据信息
     */
    @PostMapping("/getDashboardInfo")
    public R<DashboardVo> getDashboardInfo(@RequestBody DashboardBo bo) {
        return R.ok(dashboardService.getDashboardInfo(bo));
    }

    /**
     * 获取垃圾清运电子档案信息
     */
    @PostMapping("/getRecycleErecordInfo")
    public R<RecycleErecordVo> getRecycleErecordInfo(@RequestBody RecycleBo bo) {
        return R.ok(dashboardService.getRecycleErecordInfo(bo));
    }

    /**
     * 获取垃圾清运工作日志
     */
    @PostMapping("/getRecycleLog")
    public R<RecycleLogVo> getRecycleLog(@RequestBody RecycleBo bo) {
        return R.ok(dashboardService.getRecycleLog(bo));
    }

    /**
     * 获取四害消杀电子档案信息
     */
    @PostMapping("/getExterminationErecordInfo")
    public R<ExterminationErecordVo> getExterminationErecordInfo(@RequestBody ExterminationBo bo) {
        return R.ok(dashboardService.getExterminationErecordInfo(bo));
    }

    /**
     * 获取取四害消杀工作日志
     */
    @PostMapping("/getExterminationLog")
    public R<ExterminationLogVo> getExterminationLog(@RequestBody ExterminationBo bo) {
        return R.ok(dashboardService.getExterminationLog(bo));
    }

    /**
     * 获取市政公厕管养电子档案信息
     */
    @PostMapping("/getToiletErecordInfo")
    public R<ToiletErecordVo> getToiletErecordInfo(@RequestBody ToiletBo bo) {
        return R.ok(dashboardService.getToiletErecordInfo(bo));
    }

    /**
     * 获取市政公厕管养工作日志
     */
    @PostMapping("/getToiletLog")
    public R<ToiletLogVo> getToiletLog(@RequestBody ToiletBo bo) {
        return R.ok(dashboardService.getToiletLog(bo));
    }

    /**
     * 获取垃圾分类督导电子档案信息
     */
    @PostMapping("/getSortingErecordInfo")
    public R<SortingErecordVo> getSortingErecordInfo(@RequestBody SortingBo bo) {
        return R.ok(dashboardService.getSortingErecordInfo(bo));
    }

    /**
     * 获取垃圾分类督导工作日志
     */
    @PostMapping("/getSortingLog")
    public R<SortingLogVo> getSortingLog(@RequestBody SortingBo bo) {
        return R.ok(dashboardService.getSortingLog(bo));
    }

}
